<%--
  Created by IntelliJ IDEA.
  User: 付万星
  Date: 2024/12/8
  Time: 10:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>理发师管理页面</title>
</head>
<style>
    .pagination {
        margin-top: 20px;
        text-align: center;
    }

    .pagination button {
        padding: 10px 20px;
        margin: 0 10px;
        cursor: pointer;
    }

    .pagination button:disabled {
        background-color: #ccc;
        cursor: not-allowed;
    }

    body {
        font-family: Arial, sans-serif;
        margin: 20px;
        padding: 0;
        background-color: #f9f9f9;
    }

    h1 {
        color: #333;
        text-align: center;
        margin-bottom: 20px;
    }

    form {
        background-color: #fff;
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 5px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }

    form input[type="text"] {
        width: calc(100% - 120px);
        padding: 10px;
        margin-right: 10px;
        border: 1px solid #ccc;
        border-radius: 5px;
    }

    form input[type="submit"] {
        padding: 10px 20px;
        background-color: #007bff;
        color: #fff;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }

    form input[type="submit"]:hover {
        background-color: #0056b3;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
    }

    table, th, td {
        border: 1px solid #ddd;
    }

    th, td {
        padding: 10px;
        text-align: left;
    }

    th {
        background-color: #f2f2f2;
    }

    tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    tr:hover {
        background-color: #f1f1f1;
    }

    a {
        color: #007bff;
        text-decoration: none;
    }

    a:hover {
        text-decoration: underline;
    }
</style>
<body>
<h1>理发师管理页面</h1>
<h1>理发师管理</h1>
<form action="barber?m=selectByName" method="post">
    <input type="text" id="username" name="name" placeholder="请输入理发师姓名进行查询">
    <input type="submit" value="点击查询">
    </br>
    <table border="1">
        <c:forEach var="barber" items="${BarberList1}">
            <tr>
                <td>${barber.id}</td>
                <td>${barber.name}</td>
                <td>${barber.packages}</td>
                <td>${barber.price}</td>
                <td>${barber.time}</td>
            </tr>
        </c:forEach>
    </table>
</form>
<table border="1">
    <tr><a href="BarberAdd.html">增加</a></tr>
    <c:forEach var="barber" items="${pageDto.list}">
        <tr>
            <td>${barber.id}</td>
            <td>${barber.name}</td>
            <td>${barber.packages}</td>
            <td>${barber.price}</td>
            <td>${barber.time}</td>
            <td><a href="barber?m=barberUpdateShow&id=${barber.id}">更新</a></td>
            <td><a href="barber?m=barberDelete&id=${barber.id}">删除</a></td>
        </tr>
    </c:forEach>
</table>
<div class="pagination-container">
    <ul id="data-list"></ul>
    <div class="pagination">
        <a id="prev-btn" disabled href="barber?m=list&page=${pageDto.pageNumber-1}">上一页</a>
        <span id="page-info">[第${pageDto.pageNumber}页]/[总页数${pageDto.totalPage}][共${pageDto.totalRecord}条数据]</span>
        <a id="next-btn" disabled href="barber?m=list&page=${pageDto.pageNumber+1}">下一页</a>
    </div>
</div>

</body>
</html>
